package com.bfsuol.yihang.customers.dto;

import com.bfsuol.Constants;
import com.bfsuol.core.entity.Entity;
import com.bfsuol.core.entity.EntitySupport;
import com.google.common.collect.Lists;
import lombok.Data;
import org.springframework.format.annotation.NumberFormat;

import java.util.Date;
import java.util.List;

@Data
public class CustomerDTO extends EntitySupport implements Entity {

    private Long id;
    private String name;
    private String phone;
    private String idCard;
    @NumberFormat(pattern = "###,###,###")
    private Integer status;
    private String remark;
    private String destinationCar;
    private String createUserName;
    private String updateUserName;
    private Integer isDelete;
    private Date createTime;
    private Date updateTime;
    private String ids;

    @Override
    public Long getId() {
        return id;
    }
    public static List<StatusList> getStatusList(){
        List<StatusList> statusLists = Lists.newArrayList();
        StatusList statusList = new StatusList();
        statusList.setName("意向客户");
        statusList.setCode(Constants.GLOBAL_CUSTOMER_STATUS_NONE+"");
        statusLists.add(statusList);

        StatusList statusList1 = new StatusList();
        statusList1.setName("当前客户");
        statusList1.setCode(Constants.GLOBAL_CUSTOMER_STATUS_OK+"");
        statusLists.add(statusList1);

        StatusList statusList2 = new StatusList();
        statusList2.setName("过户客户");
        statusList2.setCode(Constants.GLOBAL_CUSTOMER_STATUS_EXPIRE+"");
        statusLists.add(statusList2);
        return statusLists;
    }

    @Data
    public static class StatusList{
        private String name;
        private String code;
    }
}
